package com.hwtx.form.domain.service;

import com.hwtx.form.domain.def.FormDef;
import com.hwtx.form.domain.def.FormProperties;
import com.hwtx.form.domain.def.Select;
import com.hwtx.form.domain.handle.FormDataHandle;
import com.hwtx.form.domain.vo.FormListVo;
import com.hwtx.form.domain.vo.FormRepData;
import com.hwtx.form.dto.FormI18nConfig;
import com.hwtx.form.dto.FormListQuery;
import com.hwtx.form.dto.FormProDto;
import com.hwtx.form.dto.FormQuery;
import com.hwtx.form.query.FormValueQuery;
import io.geekidea.boot.framework.page.Paging;
import io.geekidea.boot.system.vo.AmisTableData;

import java.util.Map;

public interface FormService {
    String getStrFormDef(Long formId, Map<String, String[]> parameterMap) throws Exception;

    String getPageFormDef(String pageName, Map<String, String[]> parameters) throws Exception;

    Long getFormIdByName(String pageName);

    FormDef getFormDef(Long formId);

    Object saveFormData(Long formId, Map<String, Object> content, String user) throws Exception;

    Map<String, String> validateForm(Long formId, Map<String, Object> formValues) throws Exception;

    FormRepData getFormData(FormValueQuery formValueQuery) throws Exception;

    Object remove(FormValueQuery formValueQuery) throws Exception;

    Object action(String formType, String actionName, Map<String, Object> content) throws Throwable;

    FormListVo<?> getFormList(FormListQuery formListQuery) throws Exception;

    AmisTableData<FormProperties> listFormInfo(FormQuery formQuery);

    Select formTypes();

    Select formOptions();

    boolean updateFormPro(FormProDto formProDto) throws Exception;

    FormI18nConfig getI18nConfig();

    boolean updateI18nConfig(FormI18nConfig formI18nConfig);

    Paging<?> page(FormListQuery formListQuery) throws Exception;

    Map<String, FormDataHandle> getFormHandles();
}
